<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="../common.inc" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="./css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="./js/calendar.js"></script>
<script type="text/javascript" language="javascript">
<!--
	function checkForm(){
	
		var customerName = document.getElementById("customerName");
		var linkmanName = document.getElementById("linkmanName");
		var industryId = document.getElementById("industryId");
		var areaId = document.getElementById("areaId");
		var officePhone = document.getElementById("officePhone");
		var mobile = document.getElementById("mobile");
		var email = document.getElementById("email");
		
		
		if( customerName.value == '' 
			&& linkmanName.value == ''
			&& industryId.value == '' && areaId.value == '' 
			&& officePhone.value == '' && mobile.value == '' 
			&& email.value == ''){
			alert("请输入查询条件！");
			return false;
		}
		return true;
	}
	
	function queryCustomer(){
		if(checkForm()){
			var customerName = document.getElementById("customerName").value;
			var linkmanName = document.getElementById("linkmanName").value;
			var industryId = document.getElementById("industryId").value;
			var areaId = document.getElementById("areaId").value;
			var officePhone = document.getElementById("officePhone").value;
			var mobile = document.getElementById("mobile").value;
			var email = document.getElementById("email").value;
			
			var values =  customerName + "," + linkmanName + "," + industryId + "," + areaId + "," ;
			values += officePhone + "," + mobile + "," + email;
			
			window.returnValue = values;
			self.close();
		}
	}
	
-->
</script>
</head>
<body><br>
	<div class="tools">
		<input class="btn1" type="button" value="确 定" onclick="queryCustomer()"/>&nbsp;&nbsp;
		<input class="btn1" type="button" value="取 消" onclick="window.close();"/>&nbsp;&nbsp;
	</div>
	
<table class="table1">
	<tr>
		<td>
			<table class="table_input" cellpadding="0" cellspacing="0" style="margin: 0 0 0 40px;">
				<tr>
					<td>客户名称：</td>
					<td><input id="customerName" name="customerName" class="input_long" type="text"/></td>
				</tr>
				
				<tr>
					<td width="20%">联系人名称：</td>
					<td><input id="linkmanName" name="linkmanName" class="input_long" type="text"/></td>
				</tr>
				
				<tr>
					<td width="20%"><!-- 行业 -->
						行业：
					</td>
					<td width="">
						<select id="industryId" name="industryId">
							<option value="">----------请选择----------</option>
							<c:forEach var="range" items="${ranges['110']}">
							<option value="${range.id}">${range.rangeValue}</option>
							</c:forEach>
						</select>
					</td>
				</tr>
				<tr>
					<td width=""><!-- 区域 -->
						区域：
					</td>
					<td width="">
						<select id="areaId" name="areaId">
							<option value="">----------请选择----------</option>
							<c:forEach var="range" items="${ranges['111']}">
							<option value="${range.id}">${range.rangeValue}</option>
							</c:forEach>
						</select>
					</td>
				</tr>
				<tr>
					<td width="20%">联系电话：</td>
					<td><input id="officePhone" name="officePhone" class="input_long" type="text"/></td>
				</tr>
				
				<tr>
					<td width="20%">手机：</td>
					<td><input id="mobile" name="mobile" class="input_long" type="text"/></td>
				</tr>
				<tr>
					<td width="20%">电子邮件：</td>
					<td><input id="email" name="email" class="input_long" type="text"/></td>
				</tr>
			</table>
		</td>
	</tr>
</table>	
</body>
</html>